package com.etsoft.ETEnglish.iCloud;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

@Configuration
public class ResourcesWebMvcConfig implements WebMvcConfigurer {

    @Override
    public void addResourceHandlers(ResourceHandlerRegistry registry) {
        //图片的资源映射
        String imgPath = "file:" + "/data/images/";
        registry.addResourceHandler("/images/**").addResourceLocations(imgPath);
    }

}
